
export const tip=(title,mask=true,duration=1500)=>{
	return new Promise((resolve,_)=>{
		uni.showToast({
			title,
			duration,
			mask,
			icon:"none",
			success: () => {
				setTimeout(resolve,duration)
			}
		})
	})
}

export const load=(title,mask=true)=>{
	uni.showLoading({title,icon:"none"})
}

export const model=(content,title='提示')=>{
	return new Promise((resolve,reject)=>{
		uni.showModal({
			title,
			content,
			success: function (res) {
				if (res.confirm) {
					resolve()
				} else if (res.cancel) {
					reject()
				}
			}
		});
	})
}
